var token = $("#token").val();
function list() {
    layui.use('table', function() {
        var table = layui.table;
        table.render({
            elem: '#test',
            url: '/getorderlist',
            page: true,
            first: '首页',
            last: '尾页',
            prev: '<em>←</em>',
            next: '<em>→</em>',
            limit: 10,
            height:540,
            cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
            , layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
            ,jump: function(obj){
                console.log(obj)
            },
            cols: [
                [
                    { field: 'order_no', title: '订单号'}
                    , { field: 'price', title: '消费金额(元)'}
                    , { field: 'product_type', title: '类型'}
                    , { field: 'created_at', title: '下单时间'}
                    , { field: 'end_at',title: '到期时间' }
                ]
            ],
            where: {
                _token: token,

            },
            method: 'get',
            done: function(res, curr, count) {

            }

        });
    });
}
list();
